﻿<%@ Page Language="C#" MasterPageFile="~/Shared/Masters/List.master" AutoEventWireup="true" Theme ="Default"
    CodeFile="MyMessage.aspx.cs" Inherits="Modules_Default_MyMessage" Title="Untitled Page" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register TagPrefix="web" TagName="listtitle" Src="~/Shared/UserControls/ListTitle.ascx" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="YYControls" Namespace="YYControls" TagPrefix="yyc" %>
<asp:Content ContentPlaceHolderID="idList" ID="idListContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="crumb">
        <asp:Label runat="server" ID="lblTitle" Text="我发送的消息"></asp:Label>
    </div>
    <div class="toolbar" id="toolbar">
        <h2>
            <web:listtitle ID="Listtitle1" runat="server" Title="我发送的消息" />
        </h2>
        <asp:LinkButton ID="btnCreate" runat="server" OnClientClick="return openEditor(this, 'add');" OnClick="CreateButton_Click">
            <asp:Label ID="lblCreatNew" runat="server" Text="">
                <img runat="server" id="imgNew" src="../../Images/icon_new.gif" style="border: 0px" />新建</asp:Label>
        </asp:LinkButton>
    </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <contenttemplate>
    <yyc:SmartGridView ID="gvMessageList" runat="server" AutoGenerateColumns="False" AllowSorting="False" OnRowCommand="gvMessageList_RowCommand"
        EmptyDataText="没有找到数据!" OnRowDataBound="gvMessageList_RowDataBound">
        <FixRowColumn FixRowType="Header,Pager" FixColumns="0,1"></FixRowColumn>
        <Columns>
            <asp:TemplateField HeaderText="操作">
                <itemtemplate>
                    <table width="46px" style="text-align: left">                    
                        <tr>
                            <td style="border: 0px solid #fff;">
                                <asp:ImageButton runat="server" CommandName="view" CommandArgument='<%#Eval("ID") %>' CausesValidation="False" ImageUrl="~/Images/icon_srh.gif" ToolTip="查看详情"  _ID='<%#Eval("ID")%>' OnClientClick="viewAssign(this, 'view');return false;" ID="ibtnSelect" ></asp:ImageButton>
                            </td>
                        </tr>
                    </table>
                
</itemtemplate>
                <controlstyle forecolor="Black" />
                <headerstyle wrap="False" horizontalalign="Center" />
                <itemstyle horizontalalign="Center" forecolor="Black" />
            </asp:TemplateField>
            <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" />
            <asp:BoundField DataField="Content" HeaderText="内容" />
            <asp:BoundField DataField="Create_Time" HeaderText="发送日期" SortExpression="Create_Time" />
            <asp:BoundField DataField="ID" HeaderText="接收人" />
        </Columns>
        <FixRowColumn FixRowType="Header,Pager" FixColumns="" />
    </yyc:SmartGridView>
     </contenttemplate>
    </asp:UpdatePanel>
<script type="text/javascript">
    function viewAssign(_this, action) {
        var url = "MyMessageDetail.aspx";
        
        return default_openEditor(url, _this, action, 650, 250,true);
    }
    
    function openEditor(_this, action) {
        var url = "MyMessageAdd.aspx";
        return default_openEditor(url, _this, action, 450, 450,true);
    } 
    
</script>
</asp:Content>
